<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>删除商品</title>
		<script type="text/javascript">
			function del(){
				var _pid=pid.value;
				var xhr=new XMLHttpRequest();
				xhr.onreadystatechange=function(){
					if(xhr.readyState==4 && xhr.status==200){
						var r=xhr.responseText;
						if(r==1){
							alert("删除成功");
						}else{
							alert("删除失败");
						}
					}
				}
				xhr.open("delete","/product/product_delete/"+_pid,true);
				xhr.send();
			}
		</script>
	</head>
	<body>
		请输入需要删除的商品标号：<br>
		<input type="text" id="pid">
		<button onclick="del()">删除</button>
	</body>
</html>
